Item Property (InfoStores Collection)
The Item
property returns a single InfoStore object from the collection. Read-only.
Syntax
objInfoStoresColl.Item(index)
objInfoStoresColl
Required.
Specifies the InfoStores collection object.
index
A long
integer that ranges from 1 to objInfoStoresColl.Count.
Data Type
Object
Remarks
The Item
property works like an accessor property for small collections.
The Item
property is the default property of a InfoStores collection, meaning that
InfoStores(index) is syntactically equivalent to InfoStores.Item(index)
in Visual Basic code.
Example
' from InfoStores_NextItem
' iInfoStoresCollIndex is an integer used as an
index
' check for
empty collection...
' check
index upper bound
If
iInfoStoresCollIndex >= objInfoStoresColl.Count Then
iInfoStoresCollIndex
= objInfoStoresColl.Count
MsgBox
"Already at end of InfoStores collection"
Exit
Function
End If
' index is
< count; can be incremented by 1
iInfoStoresCollIndex = iInfoStoresCollIndex + 1
Set
objInfoStore = objInfoStoresColl.Item(iInfoStoresCollIndex)
If
objInfoStore Is Nothing Then
MsgBox
"Error, cannot get this InfoStore object"
Exit
Function
Else
MsgBox
"Selected InfoStore " & iInfoStoresCollIndex
End If
See Also
InfoStore
Object